<?php
// +----------------------------------------------------------------------
// | snake
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2022 http://baiyf.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: NickBai <1902822973@qq.com>
// +----------------------------------------------------------------------
namespace app\admin\model;

use think\Model;

class AreaModel extends Model
{
    // 确定链接表名
    protected $table = 'cbdd_areas';
    public function getAreaName(){
        $where['area_type'] = 1;
        // $where['parent_id'] = $id;
        $result = $this->where($where)->select();
        return $result;
    }

    public function getOneAreaName($id){
        $where['area_id'] = $id;
        $result = $this->where($where)->find();
        return $result;
    }

    public function getParentAreaName($id){
        $where['parent_id'] = $id;
        $result = $this->where($where)->select();
        return $result;
    }

}